#include "iostream"
#include "cmath"

using namespace std;

class COMPLEX {
	private:
		double real, imag;
	public:
		void set(double, double);
		double getReal() {
			return real;
		}
		double getImag() {
			return imag;
		}
		double module() {
			return sqrt(real * real + imag * imag);
		}
		COMPLEX add(COMPLEX);
		void show();
};

void COMPLEX::set(double a, double b) {
	real = a;
	imag = b;
}

COMPLEX COMPLEX::add(COMPLEX a) {
	COMPLEX temp;
	temp.real = real + a.real;
	temp.imag = imag + a.imag;
	return temp;
}

void COMPLEX::show() {
	if (imag >= 0)
		cout << real << "+" << imag << 'j';
	else
		cout << real << imag << 'j';
}

int main() {
	COMPLEX a, b, c;
	double x, y;
	cin >> x >> y;
	a.set(x, y);
	cin >> x >> y;
	b.set(x, y);
	c = a.add(b);
	c.show();
	cout << endl;
	cout << c.getReal() << endl;
	cout << c.getImag() << endl;
	cout << c.module() << endl;
	return 0;
}
